import request from '@/utils/request'

// 查询门店信息列表
export function listStorelist(query) {
  return request({
    url: '/system/storelist/list',
    method: 'get',
    params: query
  })
}

// 查询门店信息详细
export function getStorelist(storeId) {
  return request({
    url: '/system/storelist/' + storeId,
    method: 'get'
  })
}

// 新增门店信息
export function addStorelist(data) {
  return request({
    url: '/system/storelist',
    method: 'post',
    data: data
  })
}


// 修改门店信息
export function updateStorelist(data) {
  return request({
    url: '/system/storelist',
    method: 'put',
    data: data
  })
}

// 删除门店信息
export function delStorelist(storeId) {
  return request({
    url: '/system/storelist/' + storeId,
    method: 'delete'
  })
}

// 添加门店所属底图
export function addStoreProduct(storeId, productId) {
  return request({
    url: '/system/storelist/addStoreProduct/' + storeId + "/" + productId,
    method: 'post'
  })
}

export function deleteStoreProduct(storeId, productId) {
  return request({
    url: '/system/storelist/deleteStoreProduct/' + storeId + "/" + productId,
    method: 'post'
  })
}




